using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;

namespace ColladaDotNet.OpenTKMapping
{
	public class ConstColorSource : ColorSource
	{
	
		public override void Bind(EffectCommonProfile args)
		{
			var c = Collada.Text;
			if (c.Length == 4)
				GL.Color4((float)c[0], (float)c[1], (float)c[2], (float)c[3]);
			else if (c.Length == 3)
				GL.Color3((float)c[0], (float)c[1], (float)c[2]);
		}
		public common_color_or_texture_typeColor Collada
		{
			get
			{
				return (common_color_or_texture_typeColor)(((common_color_or_texture_type)rawNode).Item);
			}
		}
	}
}